﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<%@ Import Namespace="CollegeWebsite.Models" %>
<div id="AjaxContent">
 
<div class="art-block">
    <div class="art-block-tl"></div>
    <div class="art-block-tr"></div>
    <div class="art-block-bl"></div>
    <div class="art-block-br"></div>
    <div class="art-block-tc"></div>
    <div class="art-block-bc"></div>
    <div class="art-block-cl"></div>
    <div class="art-block-cr"></div>
    <div class="art-block-cc"></div>
    <div class="art-block-body">

<div class="art-blockheader">
    <div class="l"></div>
    <div class="r"></div>
    <h3 class="t">Chose a course</h3>
</div>
 <script type="text/javascript">
     function _ajaxthis() {
         $.ajax({
             type: 'POST',
             url: '<%= Url.Action("AdmissionForm") %>',
             data: $('form').serialize(),
             success: function(data) {
                 $('#AjaxContent').html(data);
                 $("select, button").uniform();
             }

         });

     }
     $(document).ready(function() { 
         $('#Department').change(function() {
             _ajaxthis();
         });
         $('#Faculty').change(function() {
             _ajaxthis();
         });
 });
        </script>
<div class="art-blockcontent">
    <div class="art-blockcontent-body">
    <% Html.BeginForm("CourseInfo", "Course"); %> 
     
      
      <label for="Faculty" class="form-label">Faculty</label>
     <%= Html.DropDownList("Faculty", new SelectList((List<Faculty>)ViewData["listFaculty"], "FacultyID", "FacultyName", ViewData["selectedFaculty"]))%>
     
     <label for="Department" class="form-label">Department</label>
    <%= Html.DropDownList("Department", new SelectList((
                                                    List<Department>)ViewData["listDepartment"], 
                                                    "DepartmentID", 
                                                    "DepartmentName", 
                                                    ViewData["selectedDepartment"]))%>
      
    

       <label for="Course" class="form-label">Course</label>
      <%= Html.DropDownList("Course", new SelectList((List<Course>)ViewData["listCourse"], "CourseID", "CourseName", ViewData["selectedCourse"]))%>


        <input id="Button1" type="submit" value="Registration"/>
        <input id="Button2" type="button" value="Cancel"/>
        
<% Html.EndForm(); %>
      <%--  <% } %>--%>
        
		<div class="cleared"></div>
    </div>
</div>
   </div>

		<div class="cleared"></div>
    </div>
</div>

